<?php
    include "include/admin_function.php";
    valid_admin();
    include "include/header.php";
?>
<title>Validate User</title>
    <div id="headline">
        <div class="wrapper">
            <h2>Validate User</h2>
        </div>
    </div>    

<div id="pagebody">
	<div class="wrapper">
<form action="validate_user.do" method=post>
<table class="center" id="contest_list">
    <thead>
    <tr>
        <th width="100">User_ID</th>
	    <th width="200">Nick Name</th>
	    <th width="150">Email</th>
	    <th width="150">School</th>
        <th width="180">
            <input class="button-secondary" type="submit" name="submit" value="Validate">
            <input class="button-secondary" type="submit" name="submit" value="Delete">
        </th>
    </tr>
    </thead>
    <tbody>
<?php
    $database = connect_database();
    $query = "select user_id, nickname, email, school from tmp_users order by user_id";
    $res = mysql_query($query, $database) or die(mysql_error());
    
    while ($row = mysql_fetch_row($res)) {
        echo "<tr>";
        echo "<td align=center>{$row[0]}</td>";
        echo "<td align=center>{$row[1]}</td>";
        echo "<td align=center>{$row[2]}</td>";
        echo "<td align=center>{$row[3]}</td>";
        echo "<td align=center>
              <input type=checkbox name=checked[] value=\"{$row[0]}\" id=checked[]></option>
              </td>";
        echo "</tr>\n";
    }
?>
</tbody></table>

</form>
    </div>
</div>

<?php
	include "include/footer.php";
?>

